#ifndef __IFAST_PACKAGE_HPP__
#define __IFAST_PACKAGE_HPP__

#include "IBasePackage.hpp"
#include "LiteNetLib/NetUtils.h"

using namespace LiteNetLib;

namespace PocketSurvival
{
    // 快速包，指在还未进行正式连接时的 UDP 通信
    class IFastPackage : public IBasePackage , public std::enable_shared_from_this<IFastPackage>
    {
    public:
        net_endpoint endpoint;    // 要通信的目标ip地址(该数据包括 ip 和 端口)

    public:
        IFastPackage();
        IFastPackage(net_endpoint *endpoint);

        inline void setEndpoint(net_endpoint *endpoint);
    };

    inline IFastPackage::IFastPackage(){}
    inline IFastPackage::IFastPackage(net_endpoint *theEndpoint)
    {
        endpoint = *theEndpoint;
    }
    inline void IFastPackage::setEndpoint(net_endpoint *theEndpoint)
    {
        endpoint = *theEndpoint;
    }
}



#endif
